package com.linghang.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//测试
@RestController
@RequestMapping("/hello")
public class TestController {

    /**
     * ResponseBody用来返回字符串或JSON对象
     *RequestMapping
     * GET,POST,PUT,DELETE
     *
     * /user?id=1
     * /user/1
     * @return
     * */
    @GetMapping("/hello")
    public String hello(){
        return "Hello World!";
    }
}